/** @file bitmap_button.h
 */
#ifndef _BMP_BUTTON_H_
#define _BMP_BUTTON_H_

#include "widget.h"
#include "bitmap.h"

typedef enum {
    SIGNAL_BMP_BUTTON_DOWN=0,
    SIGNAL_BMP_BUTTON_UP,
    SIGNAL_BMP_BUTTON_MAX
} bmp_button_signal;

class BitmapButton:public Widget
{
public:
    BitmapButton(HWND parent=0, Bitmap *bitmap=0);
    ~BitmapButton();
    
    Bitmap *bitmap;
    void setBitmap(Bitmap  *bitmap);

    Signal signal[SIGNAL_BMP_BUTTON_MAX];

private:
    char state;
    virtual void draw(Rect *r);
    virtual int eventHandler(HWND hWnd, int iMsg, WPARAM wParam, LPARAM lParam);
    void setupWidgets();
};


#endif

